package com.zw.chat.domain;

import com.zw.chat.common.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @author by: zyl
 * @ClassName: ChatMessage
 * @Description: 聊天消息
 * @Date: 2024/12/5 10:19
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Document(collection = "chat_message")
public class ChatMessage extends BaseEntity {

    /* 消息内容 */
    private String content;

    /* 消息类型 use:用户 assistant:AI */
    private String role;

    /* 会话 */
    @DBRef
    private ChatSession session;
}
